import {get} from '../get'
import {post} from '../post'
import myAddressApi from '../../config/api/myAddressApi'

//获取子地区
export function findChildListMap(obj,token) {
  return get(myAddressApi.findChildListMap, obj,token);
}

//获取根地区
export function findParentList(token) {
  return get(myAddressApi.findParentList,{}, token);
}
//获取根地区
export function save(obj,token) {
  return post(myAddressApi.save,obj, token);
}
//获取收货地址
export function findAllAddressList(obj,token) {
  return get(myAddressApi.findAllAddressList,obj, token);
}

//设置默认使用
export function isUsed(obj,token) {
  return post(myAddressApi.isUsed,obj, token);
}

//删除收货地址
export function deleteAddress(obj,token) {
  return post(myAddressApi.deleteAddress,obj, token);
}
//获取默认收货地址
export function findDefaultAddress(obj,token) {
  return get(myAddressApi.findDefaultAddress,obj, token);
}
